#include"SList.h"

void test1()
{
	SLTNode* plist = NULL;

	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPushFront(&plist, 1);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 3);
	SLTPushFront(&plist, 4);
	SLTPrint(plist);
}

void test2()
{
	SLTNode* plist = NULL;
	
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPushBack(&plist, 5);
	SLTPushBack(&plist, 5);
	SLTPushBack(&plist, 6);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 1);
	SLTPrint(plist);

	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPrint(plist);
}

void test3()
{
	SLTNode* plist = NULL;

	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPushBack(&plist, 5);
	SLTPushBack(&plist, 5);
	SLTPushBack(&plist, 6);
	SLTPushFront(&plist, 1);
	SLTPrint(plist);

	SLTInsertAfter(SLTFind(plist, 1), 2);
	SLTEraseAfter(SLTFind(plist, 5));
	SLTPrint(plist);

	SLTDestroy(&plist);
	SLTPrint(plist);
}



int main()
{
	//test1();
	//test2();
	test3();


	return 0;
}